/**
 * 
 */

package com.wutianyi.nio.interfaces.impl;

import java.nio.ByteBuffer;

import com.wutianyi.nio.interfaces.BufferFactory;

/**
 * @author wutianyi
 * 
 */
public class DumpBufferFactory implements BufferFactory {

	private int	capacity;

	public DumpBufferFactory(int capacity) {

		this.capacity = capacity;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.wutianyi.nio.interfaces.BufferFactory#newBuffer()
	 */
	@Override
	public ByteBuffer newBuffer() {

		return (ByteBuffer.allocate(capacity));
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.wutianyi.nio.interfaces.BufferFactory#returBuffer(java.nio.ByteBuffer)
	 */
	@Override
	public void returBuffer(ByteBuffer buffer) {

		// TODO Auto-generated method stub

	}

}
